home *** CD-ROM | disk | FTP | other *** search
- /*
- 2010 - Copyright by Bee <http://www.honeybeenet.altervista.org>.
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License
- as published by the Free Software Foundation; either version 2
- of the License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
- //Filter handler for internal scripts!!!!!!!!!!
- function beefree_h_script_add(data)
- {
- data = beefree_h_script_overwrite_bool_check(data, "enabled");
- data = beefree_h_script_overwrite_bool_check(data, "referer.remove");
- data = beefree_h_script_overwrite_bool_check(data, "useragent.remove");
- data = beefree_h_script_overwrite_bool_check(data, "links.remove");
- data = beefree_h_script_overwrite_bool_check(data, "links.onload");//extra
- beefree_website_add(data);
- //beefree_console_print("[BeeFREE] has added this filter `" + data["name"] + "'!!!!");
- }
-
- function beefree_h_script_overwrite_bool_check(data, item)
- {
- var path = "website." + data["name"] + "." + item;
- //beefree_console_print("[BeeFREE] Test on: " + path);
- if(beefree_pref_do_exists(path))
- {
- var value = beefree_pref_do_get_bool(path, data[item]);
- if(value == data[item])
- {
- beefree_console_print("[BeeFREE] Removing default value `"+value+"' set on: " + path.toLowerCase() + " (relative path)");
- beefree_pref_do_delete(path);
- }
- else
- data[item] = value;
- }
- return data;
- }
-
-